<html lang="zh-cn">
    <head>
        <script async="" type="text/javascript" src="http://pagead2.googlesyndication.com/pub-config/ca-pub-0608155192548477.js"></script>
        <script src="/assets/sweet-alert.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0, user-scalable=no"/>
<title>丹丹和小伙伴的聚会</title>
    <link rel="stylesheet" href="/assets/style.css">
    <link rel="stylesheet" href="/assets/fort.css">
    <link rel="stylesheet" href="/assets/sweet-alert.css">    


    <script src="/assets/fort.js"></script>
</head>
<body>

<div class="form-wrapper">
	<!--顶端的彩色进度条-->
    <div class="top">
    	<div class="colors">
      	</div>
	</div>
          
    <img src="assets/profile.png" width="100" height="100">
    		<div class="form-item">
                <h4 style="text-align:left;margin-left:30px;">小伙伴们,</h4>
                <h3>丹姑娘的工程师在等您录入信息</h3>
            </div>
	<form method="post" action="insert2.php" name="form">
        <div class="form">
			<div class="form-item">
				<input type="text" id="name" name="name" placeholder="姓名" autocomplete="off">
			</div>
            <div class="form-select">
                性别:
                <select id="gender" class="select-item" name="gender">
  					<option value ="1">无敌帅哥</option>
  					<option value ="0">绝色美女</option>
				</select>
			</div>            
            <div class="form-item">
                <input type="text" id="telephone" name="telephone" placeholder="电话" maxlength="11" autocomplete="off">
			</div>
			<div class="form-item">
				<input type="text" id="work" name="work" placeholder="职业" autocomplete="off">
			</div>            
            <div class="button-panel">
     			<input type="submit" class="button" value="加入大家庭" onclick="return check()">
   			</div>
            
            
		</div>
	</form>
</div>
</body>
</html>    
    
<script>
    flash();
</script>

    
  

    
<script type="text/javascript" src="http://cdn.staticfile.org/jquery/1.8.2/jquery.min.js"></script>
    
<script type="text/javascript" src="/assets/jquery.bsAlerts.min.js"></script>
    
<script type="text/javascript">
        
    
    	function check(){
            
            name = document.getElementById('name').value  			
            gender = document.getElementById('gender').value
            telephone = document.getElementById('telephone').value
            work = document.getElementById('work').value
            
            if(name==""||work==""||telephone==""){
                swal({   
                    	title: "别偷懒...",
                    	text: "丹姑娘说啦，不填上怎么联系你嘞.",
                    	timer: 2000,
                    	type: "warning"
                });
                return false;
            }
            else{
                
                var flag = checkForm(telephone);
                return flag;
            }
			                
            
        }
		
    	
    	function checkForm(tel){
            var re=/^(13[0-9]{9})|(15[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})$/;
  			if(!re.test(tel)){
                swal({   
                    	title: "快仔细看看..",
                    	text: "手机号码格式不正确呀.",
                    	timer: 2000,
                    	type: "error"
                });
                return false;
            }
        }
    

  
    
</script>  

